package com.xjm.ips.mapper;

import com.xjm.ips.entity.Employee;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Employee record);

    int insertSelective(Employee record);

    Employee selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Employee record);

    int updateByPrimaryKey(Employee record);
    List<Employee> getEmployee(@Param("pageNo") Integer pageNo, @Param("pageSize") Integer pageSize,
                               @Param("employee") Employee employee, @Param("depPath") String depPath);

    Long getTotal(@Param("employee") Employee employee, @Param("depPath") String depPath);

    Integer getjobNo();

    Integer addEmployees(@Param("list") List<Employee> list);


    List<Employee> getEmployeeByPageWithSalary(@Param("pageNo") Integer pageNo, @Param("pageSize") Integer pageSize);

    Integer updateEmploeeOfSalaryById(@Param("employeeId") Integer employeeId, @Param("salaryId") Integer salaryId);

    Employee getEmpByWorkID(String workID);

    //非左连接查询，只查询员工信息并拥有工资套账的员工信息
    List<Employee> selectEmployeeWithSalary(String workid);

    Integer insertSelectiveToNotWork(Employee employee);

    List<Employee> getEmpOfNotWork(@Param("pageNo") Integer pageNo, @Param("pageSize") Integer pageSize,
                                   @Param("employee") Employee employee);

    Long getTotalOfNotWork(@Param("employee") Employee employee);

    Integer deleteByPrimaryKeyOfRemove(Integer id);

    Integer batchDeleteEmployeeByIds(@Param("ids") Integer[] ids);
}